package com.zjjt.dc.modules.srv.controller.lw;

import cn.hutool.json.JSONObject;
import com.zjjt.dc.common.api.CommonResult;
import com.zjjt.dc.modules.datacatch.entity.QueryCondition;
import com.zjjt.dc.modules.srv.service.lw.ILWService;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Api(tags = "辽宁文玩交易所接口")
@Tag(name = "LWApiController", description = "辽宁文玩交易所接口")
@RequestMapping("/api/v1/exchange/liaowen")
public class LWApiController {

    @Autowired
    ILWService lwService;

    @PostMapping("/getDataByCondition")
    @Parameters({
            @Parameter(name = "condition", description = "查询条件", required = false)
    })
    public CommonResult<List<JSONObject>> getDataByCondition(@RequestBody(required = false) QueryCondition condition) {
        return CommonResult.success(lwService.getDataByCondition(condition));
    }

}
